<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<title>用户修改</title>

<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/admin.css">
<script src="js/jq.js"></script>
<script src="js/admin.js"></script>
</head>
<body>
<div class="panel admin-panel ">
  <div class="panel-head" ><strong class="icon-reorder">修改分类</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="MenuServlet?method=updateMenu"> 
    <!-- 主菜单 -->       
      <div class="form-group">
        <div class="label">
          <label>所属主菜单：</label>
        </div>
        <div class="field">
         <select name="menupId" id="menupId" class="input w50">
        <c:forEach items="${alm }" var="a">
            
        	<c:if test="${a.menuId == lm[0].menupId }">
        		<option value="${a.menuId }" selected="selected">${a.menuName }</option>
        	</c:if>
        	
        	<c:if test="${a.menuId != lm[0].menupId }">
        		<option value="${a.menuId }">${a.menuName }</option>
        	</c:if>
        </c:forEach>
        </select> 
          <div class="tips"></div>
        </div>
      </div>        
      
      <!-- 次级菜单 -->       
      <div class="form-group">
        <div class="label">
          <label>菜单编号：</label>
        </div>
        <div class="field">
        <input type="text" name="menuId" value="${lm[0].menuId }" class="input w50" data-validate="required:请输入菜单编号">
        <input type="hidden" name="rmenuId" value="${lm[0].menuId }">
          <div class="tips"></div>
        </div>
      </div> 
      
     <!-- 菜单名称 -->             
      <div class="form-group">
        <div class="label">
          <label>菜单名称：</label>
        </div>
        <div class="field">
          <input type="text" value="${lm[0].menuName }" class="input w50" name="menuName" data-validate="required:请输入菜单名称"/>         
        </div>
      </div>
            
     <!-- url -->            
      <div class="form-group">
        <div class="label">
          <label>url：</label>
        </div>
        <div class="field">
        <input type="text" class="input w50" value="${lm[0].url }" name="url" data-validate="required:请输入url"/>
        </div>
      </div>
      

      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
</body>

</html>